/*
 * Lock.hpp
 *
 *  Created on: Oct 8, 2013
 *      Author: z1083248
 */

#ifndef LOCK_HPP_
#define LOCK_HPP_

namespace datastore
{

template<typename T>
class Lock
{
public:
   Lock(T mutex) :
         mutex_(mutex)
   {
      mutex_.lock();
   }

   ~Lock()
   {
      mutex_.unlock();
   }
private:
   T mutex_;
};

}

#endif /* LOCK_HPP_ */
